export default {
  // 若已有配置
  outputPath: "./build",
  singular: true,
  //singular 为 true来让 page 变为约定的文件夹,
  //否则是pages
  plugins: [
    [
      "umi-plugin-react",
      {
        antd: true,
        dva: true,
        locale: {
          enable: true,
        },
      }
    ]
  ],
  //配置后，默认到layout目录找index.js
  routes: [
    {
      path: "/",
      component: "../layout",
      routes: [
        {
          path: "/",
          component: "./home"
        },
        {
          path: "home",
          component: "./home"
        },
        {
          path: "book-table",
          component: "./book-table"
        },{
          path: "book-table-v2",
          component: "./book-table-v2"
        }, {
          path: 'puzzle-card',
          component: './puzzle-card'
        }, {
          path: "/search",
          routes: [{
            path: "baidu",
            component: "./search/baidu"
          }]
        },
        {
          path: "dashboard",
          routes: [
            {
              path: 'analysis',
              component: './dashboard/analysis'
            },
            {
              path: 'monitor',
              component: './dashboard/monitor'
            },
            {
              path: 'workplace',
              component: './dashboard/workplace'
            }
          ]
        },
        {
          path: "music",
          routes: [
            {
              path: 'yun-music',
              component: './music/yun-music'
            },
            {
              path: 'qq-music',
              component: './music/qq-music'
            },
            {
              path: 'kuwo-music',
              component: './music/kuwo-music'
            }
          ]
        },
        {
          path: "test",
          routes: [
            {
              path: 'shopping',
              component: './shopping'
            }, {
              path: "form",
              component: "./form"
            }, 
            {
              path: "card",
              component: "./card"
            }, 
            {
              path: "book-chart",
              component: "./book-chart"
            }, 
            {
              path: "upload",
              component: "./upload"
            }, 
            {
              path: "locale",
              component: "./locale"
            }
          ]
        },
        {
          path: "/hello-world",
          component: "./hello-world"
        },
        {
          path: "/hello-world-with-less",
          component: "./hello-world-with-less"
        },
        {
          path: "/hello-world-with-scss",
          component: "./hello-world-with-scss"
        }
      ]
    }
  ],
  // proxy: {
  //   '/dev': {
  //     target: 'https://08ad1pao69.execute-api.us-east-1.amazonaws.com',
  //     changeOrigin: true,
  //   },
  // },
  theme: {
    "@primary-color": "#30b767",//全局主要顏色
  }
};
